﻿CREATE TABLE [dbo].[HospInfo] (
    [Id]          INT            IDENTITY (1, 1) NOT NULL,
    [HospId]      INT            NOT NULL,
    [DeptId]      INT            NULL,
    [DrId]        INT            NULL,
    [Key]         NVARCHAR (50)  NOT NULL,
    [Title]       NVARCHAR (200) NULL,
    [Content]     NTEXT          NULL,
    [Sort]        INT            NULL,
    [IsDisabled]  BIT            DEFAULT ((0)) NOT NULL,
    [RecStatus]   INT            NOT NULL,
    [RecCreateDt] DATETIME       NOT NULL,
    [RecUpdateDt] DATETIME       NULL,
    [RecDeleteDt] DATETIME       NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'医院综合信息表，该表所需变量从HospInfoVar取值', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'主键，自增长', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'医院Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'HospId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'科室Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'DeptId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'医生Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'DrId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'变量键名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'Key';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'标题', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'Title';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'内容', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'Content';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'同名键的内部排序', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'Sort';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'是否禁用', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'IsDisabled';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录状态, 1：正常；2：删除', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'RecStatus';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'RecCreateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录上次修改时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'RecUpdateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录删除时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfo', @level2type = N'COLUMN', @level2name = N'RecDeleteDt';

